import { defineStore } from "pinia";
import ID from "../enum";
export const useLoginStore = defineStore(ID.LOGIN, {
  state: () => {
    return {
      loginCode: "", // 微信登录code 换取openId
      show: false, // 登录弹窗显隐
    };
  },
  // 支持同步,异步
  actions: {
    /** 微信登录code 换取openId */
    setLoginCode(e) {
      this.loginCode = e;
    },
    setLoginShow(e) {
      this.show = e;
    },
  },
});
